import request, { download } from "@/utils/request";

//首页项目申报数据
export function getMessageList(data) {
  return request({
    url: "/homePageTotal/homePageStatistics",
    method: "get",
    params: data,
  });
}
//首页待办事项列表
export function getMattersList(data) {
  return request({
    url: "/homePageTotal/resourceApplyAndCollect",
    method: "get",
    params: data,
  });
}
//首页我的消息列表
export function getMessage(data) {
  return request({
    url: "/homePageTotal/msgList",
    method: "get",
    params: data,
  });
}
//专家抽取列表
export function getExpertsList(data) {
  return request({
    url: "/system/task/reviewTL",
    method: "get",
    params: data,
  });
}
//专家抽取详情
export function getExpertsDetails(data) {
  return request({
    url: "/system/task/expert/" + data,
    method: "get",
    // params:data
  });
}
//绩效统计接口
export function getStatisticsList(data) {
  return request({
    url: "/web/performanceStatistics/statisticsList",
    method: "get",
    params: data,
  });
}
//绩效统计详情接口
export function getStatisDetails(data) {
  return request({
    url: "/web/performanceStatistics/getInfo/" + data,
    method: "get",
    // params:data
  });
}

// 查询所有未读消息数
export function getUnMessageCount() {
  return request({
    url: "/homePageTotal/count",
    method: "get",
  });
}

// 修改消息已读状态
export function updateMessage(id) {
  return request({
    url: "/homePageTotal/update/" + id,
    method: "put",
  });
}
// 绩效统计导出
  export function exportTable(data) {
    return download('/web/performanceStatistics/export', data, `绩效统计导出-${new Date().getTime()}.pdf`)
  }
  //绩效查询平均分
    export function getAverageScore(id) {
      return request({
        url: "/score/averageScore",
        method: "get",
        params:id
      });
    }


